/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import java.io.File;
/*     */ import java.io.IOException;
/*     */ import java.io.RandomAccessFile;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class mk
/*     */   extends RandomAccessFile
/*     */ {
/*     */   private long d;
/*     */   private File[] z;
/*     */   private RandomAccessFile i;
/*  19 */   private byte[] w = new byte[1];
/*  20 */   private int q = 0;
/*     */   private String g;
/*     */   
/*     */   public mk(String str1, String str2) throws IOException {
/*  24 */     this(new File(str1), str2);
/*     */   }
/*     */   
/*     */   public mk(File file, String str) throws IOException {
/*  28 */     this(file, str, dd.v(file));
/*     */   }
/*     */   
/*     */   public mk(File file, String str, File[] arrayOfFile) throws IOException {
/*  32 */     super(file, str);
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */     
/*  41 */     close();
/*     */     
/*  43 */     if (dg.w.v().equals(str)) {
/*  44 */       throw new IllegalArgumentException("write mode is not allowed for NumberedSplitRandomAccessFile");
/*     */     }
/*     */     
/*  47 */     v(arrayOfFile);
/*     */     
/*  49 */     this.i = new RandomAccessFile(file, str);
/*  50 */     this.z = arrayOfFile;
/*  51 */     this.d = file.length();
/*  52 */     this.g = str;
/*     */   }
/*     */ 
/*     */   
/*     */   public int read() throws IOException {
/*  57 */     int i = read(this.w);
/*     */     
/*  59 */     if (i == -1) {
/*  60 */       return -1;
/*     */     }
/*     */     
/*  63 */     return this.w[0] & 0xFF;
/*     */   }
/*     */ 
/*     */   
/*     */   public int read(byte[] arrayOfByte) throws IOException {
/*  68 */     return read(arrayOfByte, 0, arrayOfByte.length);
/*     */   }
/*     */ 
/*     */   
/*     */   public int read(byte[] arrayOfByte, int i, int j) throws IOException {
/*  73 */     int k = this.i.read(arrayOfByte, i, j);
/*     */     
/*  75 */     if (k == -1) {
/*  76 */       if (this.q == this.z.length - 1) {
/*  77 */         return -1;
/*     */       }
/*  79 */       v(this.q + 1);
/*  80 */       return read(arrayOfByte, i, j);
/*     */     } 
/*     */     
/*  83 */     return k;
/*     */   }
/*     */ 
/*     */   
/*     */   public void write(int i) throws IOException {
/*  88 */     throw new UnsupportedOperationException();
/*     */   }
/*     */ 
/*     */   
/*     */   public void write(byte[] arrayOfByte) throws IOException {
/*  93 */     write(arrayOfByte, 0, arrayOfByte.length);
/*     */   }
/*     */ 
/*     */   
/*     */   public void write(byte[] arrayOfByte, int i, int j) throws IOException {
/*  98 */     throw new UnsupportedOperationException();
/*     */   }
/*     */ 
/*     */   
/*     */   public void seek(long l) throws IOException {
/* 103 */     int i = (int)(l / this.d);
/*     */     
/* 105 */     if (i != this.q) {
/* 106 */       v(i);
/*     */     }
/*     */     
/* 109 */     this.i.seek(l - i * this.d);
/*     */   }
/*     */ 
/*     */   
/*     */   public long getFilePointer() throws IOException {
/* 114 */     return this.i.getFilePointer();
/*     */   }
/*     */ 
/*     */   
/*     */   public long length() throws IOException {
/* 119 */     return this.i.length();
/*     */   }
/*     */   
/*     */   public void v(long l) throws IOException {
/* 123 */     this.i.seek(l);
/*     */   }
/*     */   
/*     */   public void v() throws IOException {
/* 127 */     v(this.z.length - 1);
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\mk.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */